package Array2;

import java.util.Random;
import java.util.Scanner;

public class ZhiShu {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int max=scanner.nextInt();
		int j=0;
		int count=0;
		for (int i = 2; i < max; i++) {
			for ( j=2; j < i-1; j++) {
				if (i%j==0) {
					break;
				}
			}
			if (j==i-1) {
				if (count%10==0) {
					System.out.println("");
				}
				System.out.print(i+"   ");
				count++;
			}
		}
	}
}
